<HEAD> </HEAD>タグの中を以下の様にする。
<HEAD><SCRIPT LANGUAGE="JavaScript"> <!----Cookie使用 var Ccount_name = "JSNCcount"; var Pre_date_name = "JSNPredate"; var CountV; var Pre_date; CountV = getCookie(Ccount_name); Date_string = getCookie(Pre_date); if (CountV == null || CountV == "null") { CountV = 0; } CountV = eval(CountV) + 1; set_count(CountV); Pre_date = getCookie(Pre_date_name); if (Pre_date == null) { Pre_date = 'はじめてのアクセスですね。'; } now = new Date(); Date_string = "前回のアクセスは、"+now.getYear()+"年"+(now.getMonth()+1)+"月"+now.getDate()+"日"+now.getHours()+"時"+now.getMinutes()+"分"+now.getSeconds()+"秒です。"; set_pre_date(Date_string); function setCookie(p_name,p_value,p_expires,p_path,p_domain,p_secure){ var v_text = ""; v_text = p_name + "=" + escape(p_value); if (p_expires){v_text = v_text + "; expires=" + p_expires.toGMTString();} if (p_path){v_text = v_text + "; path=" + p_path;} if (p_domain){v_text = v_text + "; domain=" + p_domain;} if (p_secure){v_text = v_text + ";" + p_secure;} document.cookie = v_text; } function getCookie(p_name) { if (document.cookie){ index = document.cookie.indexOf(p_name, 0); if (index != -1) { val_start = (document.cookie.indexOf("=", index) + 1); val_end = document.cookie.indexOf(";", index); if (val_end == -1){ val_end = document.cookie.length; } return(unescape(document.cookie.substring(val_start, val_end))); } } return(null); } function set_count(set_count_value){ var p_expires = new Date(); p_value = set_count_value; p_expires.setTime(p_expires.getTime() + (6 * 30 * 24 * 60 * 60 * 1000)); // p_expires = null; p_path = '/'; p_domain = null; p_secure = false; setCookie(Ccount_name,p_value,p_expires,p_path,p_domain,p_secure); } function set_pre_date(pre_date_value){ var p_expires = new Date(); p_value = pre_date_value; p_expires.setTime(p_expires.getTime() + (6 * 30 * 24 * 60 * 60 * 1000)); // p_expires = null; p_path = '/'; p_domain = null; p_secure = false; setCookie(Pre_date_name,p_value,p_expires,p_path,p_domain,p_secure); } //END ---> </SCRIPT> <META name="GENERATOR" content="IBM HomePage Builder 2000 for Windows"> <TITLE></TITLE> </HEAD>
<BODY> </BODY> タグの中を以下の様にする。
<BODY bgcolor="#000000" text="#ffff00"> <P><BR> <BR> <BR><BR> <BR> <BR><BR><BR> <BR> </P> <CENTER><SCRIPT LANGUAGE="JavaScript"> <!---表示 document.write("☆ あなたのこのページへのアクセス数は、# <font color=#ff0000><big><big><big>"); document.write(CountV); document.write("</big></big></font> です。"); document.write("<br>"); document.write(Pre_date); //END ---> </SCRIPT> <BR> </CENTER></BODY>